
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:little_game/pages/index.dart';
import 'package:little_game/redux/GlobalStore.dart';
import 'package:little_game/redux/action.dart';
import 'package:redux/redux.dart';

class ConfigApp extends StatelessWidget{
  final Store<GlobalStore> store;
  ConfigApp({this.store});
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return StoreProvider<GlobalStore>(
        store: store,
        child:StoreBuilder<GlobalStore>(
          builder: (ctx,s){
            return MaterialApp(
              routes: {
                "/":(BuildContext c)=> Index()
              },
              locale: s.state.locale,
              initialRoute: "/",
            );
          },
          onInitialBuild: (s){

          },
        )
    );
  }


}